home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / PowerD / powerd / source / lib / chunky_lib.lha / Chunky_PPC / PutPixelFast.ass < prev    next >
Encoding:
Text File  |  2000-07-13  |  505 b   |  20 lines

  1. # this function writes a coloured pixel into the chunky buffer
  2.  
  3. # use this function with care, it doesn't check for bounds or if chunky array is correct
  4.  
  5. # PutPixelFast(chunky:r3:PTR TO chunky,x:r4:LONG,y:r5:LONG,colour:r6:LONG)
  6.  
  7.     .text
  8.     .global    _PutPixelFast
  9.  
  10. _PutPixelFast:
  11.     lwz    r0,0(r3)
  12.     mullw    r5,r5,r0
  13.     add    r4,r5,r4        # r4 now contains position in buffer
  14.     lwz    r3,8(r3)        # r3 now contains pointer to chunky buffer
  15.     stbx    r6,r3,r4
  16.     blr
  17.  
  18.     .type    _PutPixelFast,@function
  19.     .size    _PutPixelFast,$-_PutPixelFast
  20.